
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class LogonPanel extends JPanel implements ActionListener  {
    private JButton backBtn;
    private Atmtest frame;
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);

    }

    public LogonPanel(Atmtest frame){
        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);


        backBtn = new JButton(Util.getIcon("/img/buttonOff.jpg"));
        backBtn.setBounds(900, 330, 100, 50);
        this.add(backBtn);
        backBtn.addActionListener(this);

    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if(backBtn == e.getSource()){
            frame.switchPanel("menu");
        }
    }
}

